
<%@ page contentType="text/html;utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="ot" uri="http://www.ideyatech.com/tides"%>
<%@ taglib prefix="idy" tagdir="/WEB-INF/tags"%>

<idy:header title_webpage="label.employee">
  <script src="${url_yui}/yahoo-dom-event/yahoo-dom-event.js"></script>
  <script src="${url_yui}/animation/animation-min.js"></script>
  <script src="${url_yui}/connection/connection-min.js"></script>
  <script src="${url_context}/script/ideyatech-${ot_version}/crud.js"></script>
</idy:header>
    <!-- BODY -->
    <div id="bd">
        <div class="yui-g">
        <div class="main">

            <div class="title-wrapper">
                <div class="title"><span><spring:message code="label.employee" /></span></div>
            </div> 
            
            <div class="contents">
    				<hr class="broad"/>
            	<table class="admin-table">
            		<thead>
            		<tr>
						<th><ot:header_sort headerField="employeeID" headerLabel="label.employee.employeeID" prefix="${ employee }" searchFormId="employeeSearch"/></th>
						<th><ot:header_sort headerField="firstName" headerLabel="label.employee.firstName" prefix="${ employee }" searchFormId="employeeSearch"/></th>
						<th><ot:header_sort headerField="middleName" headerLabel="label.employee.middleName" prefix="${ employee }" searchFormId="employeeSearch"/></th>
						<th><ot:header_sort headerField="lastName" headerLabel="label.employee.lastName" prefix="${ employee }" searchFormId="employeeSearch"/></th>
            			<th>&nbsp;</th>
            		</tr>
            		</thead>
            		<tbody id="employee-table-results">
            		<c:forEach items="${results.results}" var="record" varStatus="status">
            		<tr id="employee-row-${ record.id }" class="row-style-${ status.count % 2 }">
						<td><c:out value="${ record.employeeID }" /></td>
						<td><c:out value="${ record.firstName }" /></td>
						<td><c:out value="${ record.middleName }" /></td>
						<td><c:out value="${ record.lastName }" /></td>
                  		<td>
							<ot:update_button id="${record.id}" page="employee.jspx" prefix="employee"/>
                    		<ot:delete_button id="${record.id}" page="employee.jspx" title="" prefix="employee"/>                  		
                  		</td>	
            		</tr>

            		</c:forEach>
            		</tbody>
            		<tr id="employee-row-new">
						<td colspan="5">
            			</td>
            		</tr>
            	</table>
            	<ot:add_button page="employee.jspx" prefix="employee"/>
            	<ot:paging results="${ results }" baseURL="employee.jspx" pageParamName="page" displaySummary="false" displayPageLinks="true" />	            	
        	</div>
        </div>
        </div>    
    </div>
    <!-- END OF BODY -->
<!-- FOOT -->
<idy:footer /> 